REM This just compiles and links it
REM Delete old version of EXE
if exist mge2gp.exe del mge2gp.exe

REM MPSGE module
lf95 -c mpsge
if errorlevel 1 goto error
lm mpsge -+mpsge ;

REM MGETOGP module
lf95 -c mgetogp
if errorlevel 1 goto error
lm mgetogp -+mgetogp ;

REM mge2gms module
lf95 -c mge2gms
if errorlevel 1 goto error
lm mge2gms -+mge2gms ;

REM main program
lf95 mge2gp -lib mgetogp mge2gms mpsge  
if errorlevel 1 goto error2

goto compok

REM Run the program
REM mge2gp > mge2gp.out
REM if errorlevel 1 goto runerror

REM goto ranok

:error
@echo off
echo .
echo Error compiling MPSGE routines
echo .
goto end

:error2
@echo off
echo .
echo Error compiling and linking main program
echo .
goto end

:runerror
@echo off
echo .
echo Error running main program
echo .
goto end

:ranok
@echo off
echo .
echo Seems to have compiled and ran ok
echo .
goto end

:compok
@echo off
echo .
echo Seems to have compiled and linked ok
echo .
goto end


:end
